define(["baseAsset", "webgl"], function(baseAsset, webgl) {
	return {
		create : function(path) {
		
			var _callback, _params;
			
			function _onImageLoaded() {
				//loaded
				this.loadState 	= baseAsset.loadState.LOADED;
				
				//trigger callback and null them
				_callback(asset, _params);
				_callback = _params = null;
			}
		
			var asset = baseAsset.create(path);
			
			asset.load = function(callback, params) {
				this.loadState 	= baseAsset.loadState.LOADING;
				
				//save callback and params for later call
				_callback 	= callback;
				_params 	= params;
				
				//load the image, actually
				asset.img = new Image();
				asset.img.onload = _onImageLoaded;
				asset.img.src = this.getPath();
			};
			
			asset.unload = function() {
				this.loadState 	= baseAsset.loadState.NOT_LOADED;
				asset.img = null;
			};
			
			return asset;
		} 
	};
});